#include "vlog/loglevel.h"

#include <iostream>

#define RESET "\033[0m"
#define BLACK "\033[30m"   /* Black */
#define RED "\033[31m"     /* Red */
#define GREEN "\033[32m"   /* Green */
#define YELLOW "\033[33m"  /* Yellow */
#define BLUE "\033[34m"    /* Blue */
#define MAGENTA "\033[35m" /* Magenta (often purplish/pinkish) */
#define CYAN "\033[36m"    /* Cyan */
#define WHITE "\033[37m"   /* White */

// Bold (High Intensity) Basic Colors
#define BOLDBLACK "\033[1m\033[30m"   /* Bold Black */
#define BOLDRED "\033[1m\033[31m"     /* Bold Red */
#define BOLDGREEN "\033[1m\033[32m"   /* Bold Green */
#define BOLDYELLOW "\033[1m\033[33m"  /* Bold Yellow */
#define BOLDBLUE "\033[1m\033[34m"    /* Bold Blue */
#define BOLDMAGENTA "\033[1m\033[35m" /* Bold Magenta */
#define BOLDCYAN "\033[1m\033[36m"    /* Bold Cyan */
#define BOLDWHITE "\033[1m\033[37m"   /* Bold White */

// Bright (High Intensity) Colors - often more vibrant
#define BRIGHTBLACK "\033[90m"   /* Bright Black (Gray) */
#define BRIGHTRED "\033[91m"     /* Bright Red */
#define BRIGHTGREEN "\033[92m"   /* Bright Green */
#define BRIGHTYELLOW "\033[93m"  /* Bright Yellow */
#define BRIGHTBLUE "\033[94m"    /* Bright Blue */
#define BRIGHTMAGENTA "\033[95m" /* Bright Magenta (often a good Pink) */
#define BRIGHTCYAN "\033[96m"    /* Bright Cyan */
#define BRIGHTWHITE "\033[97m"   /* Bright White */

// Adding a specific "PINK" using Bright Magenta
#define PINK BRIGHTMAGENTA               /* Pink (using Bright Magenta) */
#define BOLDPINK "\033[1m" BRIGHTMAGENTA /* Bold Pink */

// Example using 256-color mode for a specific pink (less portable)
// #define PINK_256      "\033[38;5;200m"  /* Pink (256-color mode, index 200) */
// #define BOLDPINK_256  "\033[1m\033[38;5;200m" /* Bold Pink (256-color mode) */

// Example using RGB true color for a specific pink (even less portable)
// #define PINK_RGB      "\033[38;2;255;192;203m" /* Pink (RGB: 255,192,203) */
// #define BOLDPINK_RGB  "\033[1m\033[38;2;255;192;203m" /* Bold Pink (RGB) */

int main(void)
{
    // 不能用uint8_t知道为啥吗^v^
    std::cout << static_cast<int>(vlog::LogLevel::FromString("DEBUG")) << "\n"
              << static_cast<int>(vlog::LogLevel::FromString("ERROR")) << "\n"
              << static_cast<int>(vlog::LogLevel::FromString("INFO")) << std::endl;

    std::cout << static_cast<int>(vlog::LogLevel::FromString("debug")) << "\n"
              << static_cast<int>(vlog::LogLevel::FromString("error")) << "\n"
              << static_cast<int>(vlog::LogLevel::FromString("info")) << std::endl;

    std::cout << vlog::LogLevel::ToString(vlog::LogLevel::Level::DEBUG) << "\n"
              << vlog::LogLevel::ToString(vlog::LogLevel::Level::ERROR) << "\n"
              << vlog::LogLevel::ToString(vlog::LogLevel::Level::INFO) << std::endl;

    std::cout << MAGENTA << "This is Magenta (often pinkish/purplish)." << RESET << std::endl;
    std::cout << BOLDMAGENTA << "This is Bold Magenta." << RESET << std::endl;
    std::cout << BRIGHTBLUE << "This is Bright Magenta (often a good pink)." << RESET << std::endl;
    std::cout << BRIGHTYELLOW << "This is PINK (using Bright Magenta)." << RESET << std::endl;
    std::cout << BRIGHTGREEN << "This is BOLD PINK." << RESET << std::endl;

    // 如果你取消注释并测试 256 色或 RGB：
    // std::cout << PINK_256 << "This is PINK from 256-color palette (index 200)." << RESET << std::endl;
    // std::cout << PINK_RGB << "This is PINK from RGB (255,192,203)." << RESET << std::endl;
    return 0;
}